//
//  WKComposeButton.m
//  WKDemo
//
//  Created by wangzhaohui-Mac on 14-8-7.
//  Copyright (c) 2014年 com.app. All rights reserved.
//

#import "WKComposeButton.h"

@implementation WKComposeButton


+ (instancetype)composeButton
{
    return [[self alloc] init];
}


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
      
        self.showsTouchWhenHighlighted = YES;
        
        self.titleLabel.font = [UIFont systemFontOfSize:12];
        //按钮标题显示模式
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat titleX = 0;
    CGFloat titleY = self.height + 5;
    CGFloat titleW = self.width;
    CGFloat titlelH = 20;
    
    self.titleLabel.frame = CGRectMake(titleX, titleY, titleW, titlelH);
    
    


}

@end
